package de.fuberlin.inf.alp2;

public class PolygonFactory {
	public static final int ListPolygon = 1;
	public static final int ArrayPolygon = 2;
	
	public static Polygon newPolygon(final int type) throws Exception {
		switch (type) {
		case PolygonFactory.ListPolygon:
			return new ListPolygon();
		case PolygonFactory.ArrayPolygon:
			return new ArrayPolygon();
		default:
			throw new Exception("Type unknown");
		}
	}
}
